package com.cskaoyan.controller.vx.wangdi;

import com.cskaoyan.bo.vx.wangdi.CurrentBo;
import com.cskaoyan.bo.vx.wangdi.GoodsCategoryBo;
import com.cskaoyan.bo.vx.wangdi.GoodsCountBo;
import com.cskaoyan.service.vx.wangdi.CatalogService;
import com.cskaoyan.vo.BaseRespVo;
import com.cskaoyan.vo.vx.wangdi.IndexVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class Catalogcontroller {

    @Autowired
    CatalogService catalogService;
    @RequestMapping("wx/catalog/index")
    public BaseRespVo index(){
        IndexVo indexVo = catalogService.index();
        return BaseRespVo.ok(indexVo);
    }

//    @RequestMapping("wx/goods/count")
//    public BaseRespVo count(){
//        GoodsCountBo goodsCountBo = new GoodsCountBo();
//        goodsCountBo.setGoodsCount(250);
//        return BaseRespVo.ok(goodsCountBo);
//    }

    //wx/catalog/current?id=1005002
    @RequestMapping("wx/catalog/current")
    public BaseRespVo current(Integer id){
        CurrentBo currentBo = catalogService.current(id);
        return  BaseRespVo.ok(currentBo);
    }

//    /wx/goods/category?id=1005002
//    @RequestMapping("wx/goods/category")
//    public BaseRespVo goodsCategory(Integer id){
//        GoodsCategoryBo goodsCategoryBo = catalogService.goodsCategory(id);
//        return  BaseRespVo.ok(goodsCategoryBo);
//    }
}

